package com.boil.qz.safekavass.web.request.param;

import com.boil.util.Constants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Pattern;

/**
 * Created by ChenYong on 2017-04-13.
 * <br>
 * 学习动态列表的请求参数。
 */
public class LearnDymListParam extends Page2Param {
    /**
     * 创建人
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_50, message = "创建人的长度在0至50个字之间")
    private String learnCreatePerson;
    /**
     * 动态标题
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_500, message = "动态标题的长度在0至500个字之间")
    private String learnTitle;
    /**
     * 动态级别
     */
    @Length(min = Constants.VALUE_0, max = Constants.VALUE_1, message = "动态级别的长度在0至1之间")
    @Pattern(regexp = Constants.NUMBER_EMPTY_RE, message = ("动态级别" + Constants.NUMBER_RE_MSG))
    private String learnLevel;

    /**
     * 默认构造器。
     */
    public LearnDymListParam() {
        super();
    }

    public String getLearnCreatePerson() {
        return learnCreatePerson;
    }

    public void setLearnCreatePerson(String learnCreatePerson) {
        this.learnCreatePerson = learnCreatePerson;
    }

    public String getLearnTitle() {
        return learnTitle;
    }

    public void setLearnTitle(String learnTitle) {
        this.learnTitle = learnTitle;
    }

    public String getLearnLevel() {
        return learnLevel;
    }

    public void setLearnLevel(String learnLevel) {
        this.learnLevel = learnLevel;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("LearnDymListParam{");
        sb.append("startDate='").append(startDate).append('\'');
        sb.append(", learnCreatePerson='").append(learnCreatePerson).append('\'');
        sb.append(", iDisplayStart=").append(iDisplayStart);
        sb.append(", sEcho=").append(sEcho);
        sb.append(", endDate='").append(endDate).append('\'');
        sb.append(", learnTitle='").append(learnTitle).append('\'');
        sb.append(", iDisplayLength=").append(iDisplayLength);
        sb.append(", iColumns=").append(iColumns);
        sb.append(", learnLevel='").append(learnLevel).append('\'');
        sb.append(", iSortingCols=").append(iSortingCols);
        sb.append('}');
        return sb.toString();
    }
}